import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import home from '@/components/home'
import page from '@/components/page/page'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      children: [{
          name: 'module/0/1/模块管理',
          path: '/module/0/1/模块管理',
          component: () => import('@/components/module/module')
        },
        {
          name: 'moduleitem',
          path: '/moduleitem',
          component: () => import('@/components/module/moduleitem')
        },
        {
          name: 'system_account',
          path: '/system_account',
          component: () => import('@/components/module/system_account')
        },
        {
          name: 'role_list',
          path: '/role_list',
          component: () => import('@/components/module/role_list')
        },
        {
          name: 'admin_setting',
          path: '/admin_setting',
          component: () => import('@/components/administrator/administrator')
        },
        {
          name: 'company',
          path: '/company',
          component: () => import('@/components/company/company')
        },
        {
          name: 'member_setting',
          path: '/member_setting',
          component: () => import('@/components/member/member')
        },
        {
          name: 'basicsetting',
          path: '/basicsetting',
          component: () => import('@/components/basicadmin/basicadmin')
        }
      ],
    },
    {
      path: '/page/page',
      name: 'page',
      component: page
    }
  ]
})
